package com.yzf.demo.demo.annotation;

import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Created by 于占峰 on 2020/3/27/027.
 */
@Component
@Data
public class DemoBean {


    public DemoBean() {
        System.out.println("DemoBean初始化......");
    }

    @Bean("demo")
    public void createDemoBean() {
        System.out.println("调用createDemoBean");
        new DemoBean();
    }
}
